package com.cabinet.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cabinet.service.ILatticeService;
import com.cabinet.service.dao.LatticeDao;
import com.cabinet.web.entity.Lattice;

@Service
public class LatticeService implements ILatticeService{
	@Autowired
	private LatticeDao latticeDao;

	@Override
	public List<Lattice> getLattice(String caid,Long coid) {
		// TODO Auto-generated method stub
		return latticeDao.getLatticeByCoid(caid, coid);
	}

	@Override
	public Lattice getLattice(Long id) {
		// TODO Auto-generated method stub
		return latticeDao.findOne(id);
	}

	@Override
	public void updateLattice(Lattice lattice) {
		// TODO Auto-generated method stub
		latticeDao.save(lattice);
	}

	@Override
	public List<Lattice> getLatticeListByCid(String cid) {
		return latticeDao.getLatticeListBycid(cid);
		// TODO Auto-generated method stub
		
	}

}
